import requests

#获取全部分类歌单的categoryId
#https://c.y.qq.com/splcloud/fcgi-bin/fcg_get_diss_tag_conf.fcg?g_tk=5381&jsonpCallback=getPlaylistTags&loginUin=0&
# hostUin=0&format=jsonp&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq&needNewCode=0

#国语歌单的歌单列表信息
#https://c.y.qq.com/splcloud/fcgi-bin/fcg_get_diss_by_tag.fcg?rnd=0.07499648392820268&g_tk=5381&jsonpCallback=getPlaylist&
# loginUin=0&hostUin=0&format=jsonp&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq&needNewCode=0&categoryId=165&sortId=5&sin=0&ein=29

#热门歌单的歌单列表信息
url= 'https://c.y.qq.com/splcloud/fcgi-bin/fcg_get_diss_by_tag.fcg?rnd=0.04378599143046411&g_tk=5381&jsonpCallback=getPlaylist&' \
     'loginUin=0&hostUin=0&format=jsonp&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq&needNewCode=0&categoryId=10000000&sortId=5&sin=0&ein=29'

#categoryId为分类标签
#sin为开始，ein为结束，这url代表第一页，30～59代表第二页
headers={'referer':'https://y.qq.com/portal/playlist.html',
         'user-agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36'}

r = requests.get(url,headers=headers)
print (r.text)
